<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>登录</title>

    <link href="css/style.css" rel="stylesheet">
    <link href="css/style-responsive.css" rel="stylesheet">

    <style>
        .registration{color: #ff9100}
    </style>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="../js/html5shiv.js"></script>
    <script src="../js/respond.min.js"></script>
    <![endif]-->
</head>

<body class="login-body">

<div class="container">
    <div class='form-signin'>
        <div class="form-signin-heading text-center">
            <img src="images/login-logo.png" width="110" alt=""/>
        </div>
        <div class="login-wrap">
            <input type="text" id="userName" name="userName" class="form-control" placeholder="用户名" autofocus>
            <input type="password" id="password" name="password" class="form-control" placeholder="密码">

            <button class="btn btn-lg btn-login btn-block" id="login" type="submit">
                <i class="fa fa-check"></i>
            </button>
            <div class="registration"></div>
        </div>
    </div>

</div>



<!-- Placed js at the end of the document so the pages load faster -->
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/modernizr.min.js"></script>
<script>
    $("#login").click(function(e){
		  $.post("system/login",{userName:$("#userName").val(),password:$("#password").val()},function(result){
			  if(result.retCode == '1'){
				  location = "index.html";
				  sessionStorage.setItem("userName",$("#userName").val());	
			  }else{
					alert(result.retMsg);  
				}		
		  },"json");
    });
</script>
</body>
</html>
